package com.dzh.mapper;

import com.dzh.pojo.Ticket;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import sun.util.resources.cldr.kea.TimeZoneNames_kea;

import java.util.Date;
import java.util.List;

@Repository
@Mapper
public interface TicketMapper {
   List<Ticket> queryTicketByad(String chufadi, String mudidi);
   Ticket queryAllTicketByTid(String tid);
   Ticket updateTicketBySale(String tid,int yupiao);
   //看看余票是否为0张
   int queryTicketYupiao(String tid);
   //退票
   Integer deleteTicketByReturn(String username,String tid);
   Ticket updateTicketByReturn(String tid,int yupiao);
   //改签
   List<Ticket> queryTicketByGaiqian(String chufadi,String mudidi,String type);

   //删票退票
   Integer deleteTicketByAdmin(String tid);

   List<Ticket> queryAllList();

   //管理员改票
   Integer updateTicketByAdmin(@Param("tid") String tid,@Param("chufadi") String chufadi,@Param("mudidi") String mudidi,
   @Param("gdate") String gdate,@Param("gtime") String gtime,@Param("adate") String adate,@Param("atime") String atime,
                               @Param("money") int money,@Param("yupiao") int yupiao,@Param("type") String type,@Param("tid1") String tid1
   );




}
